#include "ThreadPool v4.hpp"
class SingleHungry
{
public:
	static SingleHungry* Creat()
	{
		return &sgl;
	}
 
private:   
    ~SingleHungry()
	{
		std::cout<<"~SingleHungry()"<<std::endl;
	}
	SingleHungry()
	{
		std::cout << "SingleHungry()"<<std::endl;
	}
	SingleHungry(const SingleHungry& sh) = delete;
	SingleHungry operator=(const SingleHungry& sh) = delete;
    
	static SingleHungry sgl;
};
SingleHungry  SingleHungry::sgl;  
class B
{
public:
    ~B()
    {
        std::cout<<"~B"<<std::endl;
    }
private:
    B()
    {
        std::cout<<"B"<<std::endl;
    }    
int a_;
};
int main()
{
    // threadPool<Task>* tp = new threadPool<Task>();
    // threadPool<Task>* tp1 =  threadPool<Task>::getthreadPool();
    // threadPool<Task>* tp2 =  threadPool<Task>::getthreadPool();
    // threadPool<Task>* tp3 =  threadPool<Task>::getthreadPool();
    // threadPool<Task>* tp4 =  threadPool<Task>::getthreadPool();
    
    // std::cout<<tp1<<std::endl;
    // std::cout<<tp2<<std::endl;
    // std::cout<<tp3<<std::endl;
    // std::cout<<tp4<<std::endl;
    // static B b;
    // b.~B();
    //生产者
    // tp->init();
    // tp->start();//开始获取任务
    // int i = 0;
    // srand(time(nullptr));
    // std::string s = "+-*/%";
    // while(true)
    // {
    //     int x = rand() %10;
    //     int y = rand() %10;
    //     i %= s.size();
    //     Task t(x,y,s[i++]);
    //     tp->push(t);
    //     sleep(1);
    // }
    return 0;
}